<!DOCTYPE html>
<html lang="en">
<head>
    <title>catpl demo</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <script src="../src/catpl.js"></script>
</head>
<body>
<div id="content"></div>

<script id="test" type="text/html">
<h1>{{title}}</h1>
</script>

<script>
    var data = {
        title: 'catpl模板引擎'
    };

    var render = catpl('test');
    var html = render(data);
    document.getElementById('content').innerHTML = html;
</script>
</body>
</html>